package leetcode.mess;

/**
 * @author mazouri
 * @create 2021-10-10 23:23
 */
public class _444_arrangeCoins {
    public int arrangeCoins(int n) {
        int i = 1;

        while (n > 0) {
            n -= i;
            i++;
        }
        return i - 1;
    }

    public static void main(String[] args) {
        System.out.println(new _444_arrangeCoins().arrangeCoins(Integer.MAX_VALUE));
    }
}
